<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <link rel="stylesheet" href="\homemobile\lib\reset.css">
	<link rel="stylesheet" href="/layui/css/layui.css">
  <link rel="stylesheet" href="\homemobile\lib\all.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.10/lib/index.css"/>
</head>
<body>

<div id="app">
  <div class="van-nav-bar__content"><div class="van-nav-bar__title van-ellipsis">渠道码</div></div>
 <!-- <van-dropdown-menu>
    <van-dropdown-item v-model="value1" :options="option1" />
  </van-dropdown-menu> -->
  <div class="pd">
    <div class="title">我的渠道码</div>
    <div class="mt">
      <van-search
          v-model="search"
          placeholder="请输入搜索关键词"
          @search="onSearch"
      >
      </van-search>
    </div>
	{if !$res}
    <div class="mt">
      <van-empty description="暂无渠道码" />
    </div>
	{/if}
  </div>
  {loop $res as $r}
  <div class="mt card">
    <div class="cardtitle">
      <p>创建时间：{$r->ctime}</p>
      <div>
        <span><van-icon size="14px" name="delete"></van-icon><a href="delete_code.html?id={$r->id}" >删除</a></span>
        <span><van-icon size="14px" name="edit"></van-icon><a href="upload_codes.html?id={$r->id}">编辑</a></span>
      </div>
    </div>
    <div class="cardbody">
      <div class="bodt-flex">
        <img src="{$r->qr_code}" alt="">
        <div class="body-text">
          <h1>
            名称:{$r->name}
            <!-- <van-button type="info" size="mini">下载二维码</van-button>download_qrcode-{$r->id}.html-->
           <a class="layui-btn layui-btn-sm" href="#">长按左边二维码保存</a>
          </h1>
          <h2>
            使用模式 : {if count($r->users) == 1}单人{else}多人{/if}
          </h2>
          <h3>
            我的状态：<span>在线</span>
          </h3>
        </div>
      </div>
      <div class="card-row">
        <dl>
          <dt>使用成员:</dt>
          <dd>
            <van-button class="vbu" plain icon="friends-o" type="info" size="mini">
              {loop $r->users as $user}
              	{$h->get_user_by_userid($r->wid,$user)['name']}{$h->get_user_by_id($r->wid,$user)['name']}&nbsp;
              {/loop}
            </van-button>
          </dd>
        </dl>
        <dl class="mt">
          <dt>备用成员:{$r->bz}</dt>
          <dd>
            -
          </dd>
        </dl>
       
      </div>
    </div>
  </div>
  {/loop}
   <p class="mt non">没有更多了</p>
  <div class="pd">
    <div class="mt">
      <a href="add_code.html"><van-button size="small" type="info" block>新建</van-button></a>
    </div>
    <div class="mt">
      <a href="javascript:history.go(-1)"><van-button size="small" block>取消</van-button></a>
    </div>
  </div>


</div>

<script src="\homemobile\lib/vue.js"></script>
<script src="\homemobile\lib/moment.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vant@2.10/lib/vant.min.js"></script>
<script>
    new Vue({
        el: '#app',
        data:{
            search:'',
            value1: 0,
            value2: 'a',
            option1: [
                { text: '分类1', value: 0 },
                { text: '分类12', value: 1 },
                { text: '分类12', value: 2 },
            ],
        },
        methods:{
            onSearch:function(){

            },
        }
    });

</script>
</body>
</html>
